# Group Custom Placeholders
Data related to custom placeholder information.

| Parameter | Description | Type | Required |
|:----------|-------------|------|----------|
| `name`  | Name | string | **yes** |
| `original-image-url` | Url of the original image | string | **yes** |
| `copyright` | Copyright for the image | string | - |
| `origin` | origin of image | string | - |
| `thumbnail-image-url` | Thumbnail version of original image | string | -  |
| `large-image-url` | Large version of original image | string | -  |
| `icon-image-url` | Icon version of original image | string | -  |

## Custom Placeholders Collection [/v1/custom-placeholders{?page%5bsize%5d,page%5bnumber%5d,sort,filter}]
+ Parameters
    + page%5bsize%5d (optional, integer, `10`) - Maximum number of resources in a single paginated response.
    + page%5bnumber%5d (optional, integer, `2`) - Page number to fetched for the paginated response.
    + sort (optional, string, `name`) - Sort the resources according to the given attribute in ascending order. Append '-' to sort in descending order.
    + filter (optional, string, `[]`) - Filter according to the flask-rest-jsonapi filtering system. Please refer: http://flask-rest-jsonapi.readthedocs.io/en/latest/filtering.html for more.


### List All Custom Placeholders [GET]
Get a list of resources

+ Request

    + Headers

            Accept: application/vnd.api+json

            Authorization: JWT <Auth Key>

+ Response 200 (application/vnd.api+json)

        {
            "meta": {
                "count": 1
            },
            "data": [
                {
                    "relationships": {
                        "event-sub-topic": {
                            "links": {
                                "self": "/v1/custom-placeholders/1/relationships/event-sub-topic",
                                "related": "/v1/custom-placeholders/1/event-sub-topic"
                            }
                        }
                    },
                    "attributes": {
                        "origin": "example",
                        "thumbnail-image-url": "http://localhost/static/media/custom-placeholders/1/thumbnail/Zk1mMHBHQV/b5ec1116-8671-4b75-8c65-387c8b114784.jpg",
                        "name": "example",
                        "copyright": "example",
                        "original-image-url": "http://localhost/static/media/custom-placeholders/1/original/UXYwdXcySV/e33a2f08-0d8c-47df-aa7d-47b132acf3a5.jpg",
                        "icon-image-url": "http://localhost/static/media/custom-placeholders/1/icon/bEY5Wk9ZNk/641c6ab8-a9fc-4759-afc9-e36579ae3ec9.jpg",
                        "large-image-url": "http://localhost/static/media/custom-placeholders/1/large/ak01T2xDTW/e5f0b4a3-f045-439a-89b5-7d1085fdaeb1.jpg"
                    },
                    "type": "custom-placeholder",
                    "id": 1,
                    "links": {
                        "self": "/v1/custom-placeholders/1"
                    }
                }
            ],
            "jsonapi": {
                "version": "1.0"
            },
            "links": {
                "self": "/v1/custom-placeholders"
            }
        }


### Create Custom Placeholder [POST]
Create a new Custom Placeholder

+ Request (application/vnd.api+json)

    + Headers

            Authorization: JWT <Auth Key>

    + Body

            {
              "data": {
                "attributes": {
                        "name": "example",
                        "origin": "example",
                        "copyright": "example",
                        "original_image_url": "https://www.w3schools.com/html/pic_mountain.jpg"
                    },
                    "type": "custom-placeholder"
              }
            }


+ Response 201 (application/vnd.api+json)

        {
            "data": {
                "relationships": {
                    "event-sub-topic": {
                        "links": {
                            "self": "/v1/custom-placeholders/1/relationships/event-sub-topic",
                            "related": "/v1/custom-placeholders/1/event-sub-topic"
                        }
                    }
                },
                "attributes": {
                    "origin": "example",
                    "thumbnail-image-url": "http://localhost/static/media/custom-placeholders/1/thumbnail/Zk1mMHBHQV/b5ec1116-8671-4b75-8c65-387c8b114784.jpg",
                    "name": "example",
                    "copyright": "example",
                    "original-image-url": "http://localhost/static/media/custom-placeholders/1/original/UXYwdXcySV/e33a2f08-0d8c-47df-aa7d-47b132acf3a5.jpg",
                    "icon-image-url": "http://localhost/static/media/custom-placeholders/1/icon/bEY5Wk9ZNk/641c6ab8-a9fc-4759-afc9-e36579ae3ec9.jpg",
                    "large-image-url": "http://localhost/static/media/custom-placeholders/1/large/ak01T2xDTW/e5f0b4a3-f045-439a-89b5-7d1085fdaeb1.jpg"
                },
                "type": "custom-placeholder",
                "id": 1,
                "links": {
                    "self": "/v1/custom-placeholders/1"
                }
            },
            "jsonapi": {
                "version": "1.0"
            },
            "links": {
                "self": "/v1/custom-placeholders/1"
            }
        }


## Custom Placeholder Details [/v1/custom-placeholders/{id}]
+ Parameters
    + id: 1 (integer) - ID of the Custom Placeholder in the form of an integer

### Custom Placeholder Details [GET]
+ Request

    + Headers

            Accept: application/vnd.api+json

            Authorization: JWT <Auth Key>

+ Response 200 (application/vnd.api+json)

        {
            "data": {
                "relationships": {
                    "event-sub-topic": {
                        "links": {
                            "self": "/v1/custom-placeholders/1/relationships/event-sub-topic",
                            "related": "/v1/custom-placeholders/1/event-sub-topic"
                        }
                    }
                },
                "attributes": {
                    "origin": "example",
                    "thumbnail-image-url": "http://localhost/static/media/custom-placeholders/1/thumbnail/Zk1mMHBHQV/b5ec1116-8671-4b75-8c65-387c8b114784.jpg",
                    "name": "example",
                    "copyright": "example",
                    "original-image-url": "http://localhost/static/media/custom-placeholders/1/original/UXYwdXcySV/e33a2f08-0d8c-47df-aa7d-47b132acf3a5.jpg",
                    "icon-image-url": "http://localhost/static/media/custom-placeholders/1/icon/bEY5Wk9ZNk/641c6ab8-a9fc-4759-afc9-e36579ae3ec9.jpg",
                    "large-image-url": "http://localhost/static/media/custom-placeholders/1/large/ak01T2xDTW/e5f0b4a3-f045-439a-89b5-7d1085fdaeb1.jpg"
                },
                "type": "custom-placeholder",
                "id": 1,
                "links": {
                    "self": "/v1/custom-placeholders/1"
                }
            },
            "jsonapi": {
                "version": "1.0"
            },
            "links": {
                "self": "/v1/custom-placeholders/1"
            }
        }


### Update Custom Placeholder [PATCH]
Update a single custom placeholder by `id`.

+ `id` (integer) - ID of the record to update **(required)**

+ Request (application/vnd.api+json)

    + Headers

            Authorization: JWT <Auth Key>

    + Body

            {
              "data": {
                "attributes": {
                        "name": "example",
                        "origin": "example",
                        "copyright": "example",
                        "original_image_url": "https://www.w3schools.com/html/pic_mountain.jpg"
                    },
                    "type": "custom-placeholder",
                    "id": "1"
              }
            }

+ Response 200 (application/vnd.api+json)

        {
            "data": {
                "relationships": {
                    "event-sub-topic": {
                        "links": {
                            "self": "/v1/custom-placeholders/1/relationships/event-sub-topic",
                            "related": "/v1/custom-placeholders/1/event-sub-topic"
                        }
                    }
                },
                "attributes": {
                    "origin": "example",
                    "thumbnail-image-url": "http://localhost/static/media/custom-placeholders/1/thumbnail/Zk1mMHBHQV/b5ec1116-8671-4b75-8c65-387c8b114784.jpg",
                    "name": "example",
                    "copyright": "example",
                    "original-image-url": "http://localhost/static/media/custom-placeholders/1/original/UXYwdXcySV/e33a2f08-0d8c-47df-aa7d-47b132acf3a5.jpg",
                    "icon-image-url": "http://localhost/static/media/custom-placeholders/1/icon/bEY5Wk9ZNk/641c6ab8-a9fc-4759-afc9-e36579ae3ec9.jpg",
                    "large-image-url": "http://localhost/static/media/custom-placeholders/1/large/ak01T2xDTW/e5f0b4a3-f045-439a-89b5-7d1085fdaeb1.jpg"
                },
                "type": "custom-placeholder",
                "id": 1,
                "links": {
                    "self": "/v1/custom-placeholders/1"
                }
            },
            "jsonapi": {
                "version": "1.0"
            },
            "links": {
                "self": "/v1/custom-placeholders/1"
            }
        }

### Delete Custom Placeholder [DELETE]
Delete a single resource.

+ Request

    + Headers

            Accept: application/vnd.api+json

            Authorization: JWT <Auth Key>

+ Response 200 (application/vnd.api+json)

        {
          "meta": {
            "message": "Object successfully deleted"
          },
          "jsonapi": {
            "version": "1.0"
          }
        }


## Custom Placeholder Details of Event Sub-topic [/v1/event-sub-topics/{event_sub_topic_id}/custom-placeholder]
+ Parameters
    + event_sub_topic_id: 1 (integer) - ID of the event sub-topic in the form of an integer

### Custom Placeholder Details of Event Sub-topic [GET]
+ Request

    + Headers

            Accept: application/vnd.api+json

            Authorization: JWT <Auth Key>

+ Response 200 (application/vnd.api+json)

        {
            "data": {
                "relationships": {
                    "event-sub-topic": {
                        "links": {
                            "self": "/v1/custom-placeholders/1/relationships/event-sub-topic",
                            "related": "/v1/custom-placeholders/1/event-sub-topic"
                        }
                    }
                },
                "attributes": {
                    "origin": "example",
                    "thumbnail-image-url": "http://localhost/static/media/custom-placeholders/1/thumbnail/Zk1mMHBHQV/b5ec1116-8671-4b75-8c65-387c8b114784.jpg",
                    "name": "example",
                    "copyright": "example",
                    "original-image-url": "http://localhost/static/media/custom-placeholders/1/original/UXYwdXcySV/e33a2f08-0d8c-47df-aa7d-47b132acf3a5.jpg",
                    "icon-image-url": "http://localhost/static/media/custom-placeholders/1/icon/bEY5Wk9ZNk/641c6ab8-a9fc-4759-afc9-e36579ae3ec9.jpg",
                    "large-image-url": "http://localhost/static/media/custom-placeholders/1/large/ak01T2xDTW/e5f0b4a3-f045-439a-89b5-7d1085fdaeb1.jpg"
                },
                "type": "custom-placeholder",
                "id": 1,
                "links": {
                    "self": "/v1/custom-placeholders/1"
                }
            },
            "jsonapi": {
                "version": "1.0"
            },
            "links": {
                "self": "/v1/event-sub-topics/1/custom-placeholder"
            }
        }
